<?php
/**
 * @author JohnnyDen <413819942@qq.com>
 * @package addons\autocontentincome\controller
 * @copyright 2018年11月19日
 */
namespace addons\autocontentincome\controller;

use mip\Init;
class AdminAutoContentIncome extends Init
{
    protected $beforeActionList = ['start'];
    protected $addonsName = '';
    public function start()
    {
        $addonsName = 'autocontentincome'; //配置当前插件名称
        $this->addonsName = $addonsName;
        $itemInfo = db('Addons')->where('id_org', config('orgId'))->where('name',$addonsName)->find();
        if (!$itemInfo || $itemInfo['status'] != 1) {
            $this->error('当前插件未启用','');
        }
    }
    
    public function autoContentIncome()
    {
        return $this->addonsFetch('admin/autocontentincome',$this->addonsName);
    }
    
    public function autoContentIncomeStep()
    {
        return $this->addonsFetch('admin/autocontentincomestep',$this->addonsName);
    }
}
